/*
 * BaseTester.java    0.0.1    26/dic/2009
 * 
 * Copyright (c) 2009 mentalsmash.org
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * The use of the Apache License does not indicate that this project is
 * affiliated with the Apache Software Foundation.
 */ 
package org.mentalsmash.tazio.transparency.impl;

import org.mentalsmash.tazio.transparency.interfaces.TransparencyMonitor;

import com.google.inject.Inject;
import com.google.inject.Singleton;

/**
 * @version ver	26/dic/2009
 * @author Enrico Savioli <savioli.enrico@gmail.com>
 */
@Singleton
public class TransparencyMonitorImpl implements TransparencyMonitor{

	private int delivererDoDeliver;
	private int dispatcherHandleMessage;
	private int groupConnectionSend;
	private int groupConnectionConnect;
	private int groupConnectionDisconnect;
	private int inputMessageListenerHandleMessage;
	private int messageFactoryEncapsulateMessage;
	private int messageFilterHandleMessage;
	private int messageFilterAdd;
	private int messageFilterRemove;
	private int resolverGetAddress;
	private int resolverGetNIDList;
	private int resolverRegisterMapping;
	private int resolverRemoveMapping;
	private int resolverResolve;
	
	@Inject
	public TransparencyMonitorImpl(){
		
		this.delivererDoDeliver = 0;
		this.dispatcherHandleMessage = 0;
		this.groupConnectionConnect = 0;
		this.groupConnectionDisconnect = 0;
		this.groupConnectionSend = 0;
		this.inputMessageListenerHandleMessage = 0;
		this.messageFactoryEncapsulateMessage = 0;
		this.messageFilterAdd = 0;
		this.messageFilterHandleMessage = 0;
		this.messageFilterRemove = 0;
		this.resolverGetAddress = 0;
		this.resolverGetNIDList = 0;
		this.resolverRegisterMapping = 0;
		this.resolverRemoveMapping = 0;
		this.resolverResolve = 0;
		
	}
	
	
	
	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#Deliverer_doDeliver()
	 */
	@Override
	public void Deliverer_doDeliver() {
		
		this.delivererDoDeliver++;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#Dispatcher_handleMessage()
	 */
	@Override
	public void Dispatcher_handleMessage() {
		
		this.dispatcherHandleMessage++;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#GroupConnection_connect()
	 */
	@Override
	public void GroupConnection_connect() {
		
		this.groupConnectionConnect++;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#GroupConnection_disconnect()
	 */
	@Override
	public void GroupConnection_disconnect() {
		
		this.groupConnectionDisconnect++;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#GroupConnection_send()
	 */
	@Override
	public void GroupConnection_send() {
		
		this.groupConnectionSend++;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#InputMessageListener_handleMessage()
	 */
	@Override
	public void InputMessageListener_handleMessage() {
		
		this.inputMessageListenerHandleMessage++;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#MessageFactory_encapsulateMessage()
	 */
	@Override
	public void MessageFactory_encapsulateMessage() {
		
		this.messageFactoryEncapsulateMessage++;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#MessageFilter_add()
	 */
	@Override
	public void MessageFilter_add() {
		
		this.messageFilterAdd++;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#MessageFilter_handleMessage()
	 */
	@Override
	public void MessageFilter_handleMessage() {
		
		this.messageFilterHandleMessage++;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#MessageFilter_remove()
	 */
	@Override
	public void MessageFilter_remove() {
		
		this.messageFilterRemove++;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#Resolver_getAddress()
	 */
	@Override
	public void Resolver_getAddress() {
		
		this.resolverGetAddress++;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#Resolver_getNIDList()
	 */
	@Override
	public void Resolver_getNIDList() {
		
		this.resolverGetNIDList++;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#Resolver_registerMapping()
	 */
	@Override
	public void Resolver_registerMapping() {
		
		this.resolverRegisterMapping++;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#Resolver_removeMapping()
	 */
	@Override
	public void Resolver_removeMapping() {
		
		this.resolverRemoveMapping++;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#Resolver_resolve()
	 */
	@Override
	public void Resolver_resolve() {
		
		this.resolverResolve++;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#get_Deliverer_doDeliver()
	 */
	@Override
	public int get_Deliverer_doDeliver() {
		
		return this.delivererDoDeliver;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#get_Dispatcher_handleMessage()
	 */
	@Override
	public int get_Dispatcher_handleMessage() {
		
		return this.dispatcherHandleMessage;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#get_GroupConnection_connect()
	 */
	@Override
	public int get_GroupConnection_connect() {
		
		return this.groupConnectionConnect;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#get_GroupConnection_disconnect()
	 */
	@Override
	public int get_GroupConnection_disconnect() {
		
		return this.groupConnectionDisconnect;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#get_GroupConnection_send()
	 */
	@Override
	public int get_GroupConnection_send() {
		
		return this.groupConnectionSend;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#get_InputMessageListener_handleMessage()
	 */
	@Override
	public int get_InputMessageListener_handleMessage() {
		
		return this.inputMessageListenerHandleMessage;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#get_MessageFactory_encapsulateMessage()
	 */
	@Override
	public int get_MessageFactory_encapsulateMessage() {
		
		return this.messageFactoryEncapsulateMessage;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#get_MessageFilter_add()
	 */
	@Override
	public int get_MessageFilter_add() {
		
		return this.messageFilterAdd;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#get_MessageFilter_handleMessage()
	 */
	@Override
	public int get_MessageFilter_handleMessage() {
		
		return this.messageFilterHandleMessage;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#get_MessageFilter_remove()
	 */
	@Override
	public int get_MessageFilter_remove() {
		
		return this.messageFilterRemove;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#get_Resolver_getAddress()
	 */
	@Override
	public int get_Resolver_getAddress() {
		
		return this.resolverGetAddress;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#get_Resolver_getNIDList()
	 */
	@Override
	public int get_Resolver_getNIDList() {
		
		return this.resolverGetNIDList;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#get_Resolver_registerMapping()
	 */
	@Override
	public int get_Resolver_registerMapping() {
		
		return this.resolverRegisterMapping;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#get_Resolver_removeMapping()
	 */
	@Override
	public int get_Resolver_removeMapping() {
		
		return this.resolverRemoveMapping;
		
	}

	/* (non-Javadoc)
	 * @see org.mentalsmash.tazio.transparency.interfaces.Tester#get_Resolver_resolve()
	 */
	@Override
	public int get_Resolver_resolve() {
		
		return this.resolverResolve;
		
	}

}
